/*----------------------------------------------------------------------------------*/
/*!
 * @file enemy.hxx
 * @brief Header-File der Enemy Informationen
 * @author steff
 *
 */
/*------------------------------------------------------------------------------------

------------------------------------------------------------------------------------*/

#ifndef __SCRO_ENEMY_H_
#define __SCRO_ENEMY_H_


/* 128 byte header of a .sei file */
struct sei_header
{
	unsigned char id[5];				/* 'S', 'E', 'I' for identification, 2 bytes reserved, 5 bytes */
	unsigned char version;				/* format version, 1 byte */
	unsigned char reserved[122];		/* reserved bytes, 122 bytes */
};

struct enemy_object_info
{
	char name[50];					/* name des objektes 			 50 	*/
	char animation_data[255];		/* dateiname des sprite files?	255		*/
	char sprite_size_w[4];			/* breite des sprites			  4		*/
	char sprite_size_h[4];			/* höhe des sprites				  4		*/
	char life_points[4];			/* lebenspunkte des gegners 	  4		*/
	char maximum_speed[4];			/* geschwindigkeit				  4		*/
	char std_sprite_from[4];		/* standard sprite begin		  4		*/
	char std_sprite_to[4];			/*                                4		*/
	char fir_sprite_from[4];		/* fireing sprites				  4		*/
	char fir_sprite_to[4];			/*                                4		*/
	char exp_sprite_from[4];		/* exploding sprites			  4		*/
	char exp_sprite_to[4];			/*                                4		*/
	char reserved[55];				/*								 55		*/
									/*							=	400		*/
};

class enemy_collection_object
{
	public:
		enemy_collection_object(struct enemy_object_info fill_with);
		~enemy_collection_object(void);
	
		struct enemy_object_info data;
		enemy_collection_object * next;
};

unsigned int sei_create_collection(char * filename);
unsigned int sei_check_file(char * filename);
enemy_collection_object * sei_load_collection(char * filename);
unsigned int sei_save_collection(char * filename, enemy_collection_object * anchor);
unsigned int sei_count_enemies(enemy_collection_object * anchor);

#endif
